<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ol>
    <li>ArrayBuffer是只读的，需要借助TypedArray和DataView对它操作</li>
    <li>TypedArray可以理解为一个抽象的概念，Int8Array、Uint8Array等都是它具体的形态</li>
</ol>
<script>
    const int8Array = new Int8Array(8);
    int8Array[0] = 100;
    int8Array[1] = 101;
    console.log(int8Array);

    const int8Array2 = new Int8Array(8);
    int8Array2[2] = 102;
    console.log(int8Array2);

    const buffer = new ArrayBuffer(16);
    const view = new DataView(buffer);
    view.setInt8(2, 40);
    console.log(view, view.getInt8(2));
</script>
</body>
</html>